package com.androidx.p013lv.mine.databinding;

import android.graphics.drawable.Drawable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.TextViewBindingAdapter;
import androidx.databinding.adapters.ViewBindingAdapter;
import com.androidx.p013lv.mine.C1206BR;
import com.androidx.p013lv.mine.C1207R;
import com.androidx.p013lv.mine.activity.ExchangeCenterActivity;
import com.androidx.p013lv.mine.bean.RecodeBean;
import com.androidx.p013lv.mine.generated.callback.OnClickListener;

/* renamed from: com.androidx.lv.mine.databinding.ActivityExchangeCenterLayoutBindingImpl */
public class ActivityExchangeCenterLayoutBindingImpl extends ActivityExchangeCenterLayoutBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback42;
    private final View.OnClickListener mCallback43;
    private long mDirtyFlags;
    private final LinearLayout mboundView0;
    private final TextView mboundView1;
    private final RelativeLayout mboundView2;
    private final TextView mboundView3;
    private final TextView mboundView4;
    private final TextView mboundView5;
    private final TextView mboundView6;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(C1207R.C1210id.toolbar, 7);
        sViewsWithIds.put(C1207R.C1210id.ed_content, 8);
        sViewsWithIds.put(C1207R.C1210id.iv_bg_vip, 9);
    }

    public ActivityExchangeCenterLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 10, sIncludes, sViewsWithIds));
    }

    private ActivityExchangeCenterLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 1, (EditText) objArr[8], (ImageView) objArr[9], (Toolbar) objArr[7]);
        this.mDirtyFlags = -1;
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.mboundView0 = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.mboundView1 = textView;
        textView.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[2];
        this.mboundView2 = relativeLayout;
        relativeLayout.setTag(null);
        TextView textView2 = (TextView) objArr[3];
        this.mboundView3 = textView2;
        textView2.setTag(null);
        TextView textView3 = (TextView) objArr[4];
        this.mboundView4 = textView3;
        textView3.setTag(null);
        TextView textView4 = (TextView) objArr[5];
        this.mboundView5 = textView4;
        textView4.setTag(null);
        TextView textView5 = (TextView) objArr[6];
        this.mboundView6 = textView5;
        textView5.setTag(null);
        setRootTag(view);
        this.mCallback43 = new OnClickListener(this, 2);
        this.mCallback42 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 64;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (C1206BR.status == i) {
            setStatus((Integer) obj);
        } else if (C1206BR.recode == i) {
            setRecode((RecodeBean) obj);
        } else if (C1206BR.onClick != i) {
            return false;
        } else {
            setOnClick((ExchangeCenterActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityExchangeCenterLayoutBinding
    public void setStatus(Integer num) {
        this.mStatus = num;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(C1206BR.status);
        super.requestRebind();
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityExchangeCenterLayoutBinding
    public void setRecode(RecodeBean recodeBean) {
        updateRegistration(0, recodeBean);
        this.mRecode = recodeBean;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(C1206BR.recode);
        super.requestRebind();
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityExchangeCenterLayoutBinding
    public void setOnClick(ExchangeCenterActivity.OnClick onClick) {
        this.mOnClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 4;
        }
        notifyPropertyChanged(C1206BR.onClick);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        if (i != 0) {
            return false;
        }
        return onChangeRecode((RecodeBean) obj, i2);
    }

    private boolean onChangeRecode(RecodeBean recodeBean, int i) {
        if (i == C1206BR._all) {
            synchronized (this) {
                this.mDirtyFlags |= 1;
            }
            return true;
        } else if (i == C1206BR.vipDay) {
            synchronized (this) {
                this.mDirtyFlags |= 8;
            }
            return true;
        } else if (i == C1206BR.status) {
            synchronized (this) {
                this.mDirtyFlags |= 16;
            }
            return true;
        } else if (i != C1206BR.reCode) {
            return false;
        } else {
            synchronized (this) {
                this.mDirtyFlags |= 32;
            }
            return true;
        }
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        boolean z;
        Drawable drawable;
        String str;
        String str2;
        String str3;
        int i;
        int i2;
        TextView textView;
        long j2;
        long j3;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        Integer num = this.mStatus;
        RecodeBean recodeBean = this.mRecode;
        ExchangeCenterActivity.OnClick onClick = this.mOnClick;
        long j4 = j & 66;
        String str4 = null;
        boolean z2 = true;
        int i3 = 0;
        if (j4 != 0) {
            boolean z3 = ViewDataBinding.safeUnbox(num) == 0;
            if (j4 != 0) {
                if (z3) {
                    j3 = j | 256;
                    j2 = 4096;
                } else {
                    j3 = j | 128;
                    j2 = 2048;
                }
                j = j3 | j2;
            }
            z = !z3;
            if (z3) {
                textView = this.mboundView6;
                i2 = C1207R.C1209drawable.base_ic_btn_main_white;
            } else {
                textView = this.mboundView6;
                i2 = C1207R.C1209drawable.base_ic_btn_main;
            }
            drawable = getDrawableFromResource(textView, i2);
        } else {
            drawable = null;
            z = false;
        }
        if ((121 & j) != 0) {
            long j5 = j & 81;
            if (j5 != 0) {
                if (recodeBean != null) {
                    i = recodeBean.getStatus();
                } else {
                    i = 0;
                }
                boolean z4 = i == 1;
                if (j5 != 0) {
                    j |= z4 ? 1024 : 512;
                }
                str = z4 ? "未兌換" : "已兌換";
            } else {
                str = null;
            }
            if ((j & 73) != 0) {
                str3 = String.valueOf((recodeBean != null ? recodeBean.getVipDay() : 0) + "天");
            } else {
                str3 = null;
            }
            if (!((j & 97) == 0 || recodeBean == null)) {
                str4 = recodeBean.getReCode();
            }
            long j6 = j & 65;
            if (j6 != 0) {
                if (recodeBean == null) {
                    z2 = false;
                }
                if (j6 != 0) {
                    j |= z2 ? 16384 : 8192;
                }
                if (!z2) {
                    i3 = 8;
                }
            }
            str2 = str4;
            str4 = str3;
        } else {
            str2 = null;
            str = null;
        }
        if ((64 & j) != 0) {
            this.mboundView1.setOnClickListener(this.mCallback42);
        }
        if ((j & 65) != 0) {
            this.mboundView2.setVisibility(i3);
        }
        if ((j & 73) != 0) {
            TextViewBindingAdapter.setText(this.mboundView3, str4);
        }
        if ((j & 81) != 0) {
            TextViewBindingAdapter.setText(this.mboundView4, str);
        }
        if ((j & 97) != 0) {
            TextViewBindingAdapter.setText(this.mboundView5, str2);
        }
        if ((j & 66) != 0) {
            ViewBindingAdapter.setBackground(this.mboundView6, drawable);
            ViewBindingAdapter.setOnClick(this.mboundView6, this.mCallback43, z);
        }
    }

    @Override // com.androidx.p013lv.mine.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        if (i == 1) {
            ExchangeCenterActivity.OnClick onClick = this.mOnClick;
            if (onClick != null) {
                z = true;
            }
            if (z) {
                onClick.btnBack();
            }
        } else if (i == 2) {
            ExchangeCenterActivity.OnClick onClick2 = this.mOnClick;
            if (onClick2 != null) {
                z = true;
            }
            if (z) {
                onClick2.btnCommit();
            }
        }
    }
}
